package cn.zkdcloud;

import cn.zkdcloud.core.WeChatListener;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletListenerRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.annotation.EnableScheduling;

@SpringBootApplication
@EnableScheduling
public class WechatNovelApplication {

	public static void main(String[] args) {
		System.out.println(Thread.currentThread().getContextClassLoader().getResource("").getPath());
		SpringApplication.run(WechatNovelApplication.class, args);
	}

	@Bean
	public ServletListenerRegistrationBean<WeChatListener> registrationServletBean(){
		ServletListenerRegistrationBean registListen = new ServletListenerRegistrationBean(new WeChatListener());
		return registListen;
	}
}
